Notes

  • d2['file_scores'][k]['paths'] is a matrix of all-pairs segment-to-segment alignments
    • indices are relative to the segment in question
    • same..['scores'] is the alignment scores:
    • use < thresholds['none'] to find the good segment pairs
  • generate data from
    • isophonics functions
    • salami functions
    • l2 norm
  • samples:
    • features = patches of cqt +- 5 frames on either side
    • positives = drawn from pairs of segments below threshold
    • negatives = "" above the threshold
  • model evaluation
    • serra method or laplacian

In [1]:
import numpy as np
import librosa
import cPickle as pickle
import numba
import os
from joblib import Parallel, delayed

In [2]:
%matplotlib inline
import matplotlib.pyplot as plt

In [3]:
def symstack(X, n_steps=3, delay=1, **kwargs):
    '''Symmetric history stacking.
    
    like librosa.feature.stack_memory, but IN THE FUTURE!!!
    '''
    rpad = n_steps * delay
    Xpad = np.pad(X,
                  [(0, 0), (0, rpad)],
                  **kwargs)
    
    Xstack = librosa.feature.stack_memory(Xpad,
                                          n_steps=2 * n_steps + 1,
                                          delay=delay,
                                          **kwargs)
    
    return Xstack[:, rpad:]

In [4]:
def load_feature_data(file_name, n_steps=5):
    
    fname = '../data/features/{}.pk'.format(file_name)
    
    data = pickle.load(open(fname, 'r'))
    
    return symstack(data['cqgram'].astype(np.float32),
                    n_steps=n_steps,
                    mode='edge'), data['intframes']

In [5]:
@numba.jit
def similarity_paths(X_raw, t_i, t_j, n_samples, max_samples, only_one=True):
    
    X = np.empty((len(t_i), X_raw.shape[0]), dtype=X_raw.dtype)
    
    S = np.zeros((X_raw.shape[1], X_raw.shape[1]))
    
    k = 0
    used_once = np.zeros(X_raw.shape[1], dtype=bool)
    
    for i, j in zip(t_i, t_j):
        if n_samples[i] >= max_samples:
            continue
        
        if only_one and (used_once[i] or used_once[j]):
            continue
            
        S[i, j] = 1
        n_samples[i] += 1
        n_samples[j] += 1
        used_once[i] = True
        used_once[j] = True
        
        #X[k] = np.abs(X_raw[:, i] - X_raw[:, j])
        #k = k + 1
    
    return S

In [6]:
import scipy.spatial

In [294]:
def plot_selfsim(max_samples=4,
                       paths=None,
                       file_name=None,
                       thresholds=None,
                       labels=None,
                       intervals=None,
                       fmeasures=None,
                       scores=None):
    
    # intframes gives the section->cqt frame alignments
    X_raw, intframes = load_feature_data(file_name)
    
    thresh = thresholds['none']
    
    n_segments = len(paths)
    
    n_samples = np.zeros((2, X_raw.shape[1]))
    
    ex_x, ex_y = [], []
    
    S = np.zeros((X_raw.shape[1], X_raw.shape[1]))
    
    for seg_i in range(n_segments):
        off_i = intframes[seg_i, 0]
        
        for seg_j in range(seg_i + 1, len(paths[seg_i])):
            off_j = intframes[seg_j, 0]
            
            
            if not isinstance(paths[seg_i][seg_j], list):
                continue
            
            if not np.isfinite(scores[seg_i, seg_j]):
                continue
            
            if scores[seg_i, seg_j] <= thresh:
                y = 1
            else:
                y = -1
            
            
            # Pull out features from the path
            t_i, t_j = paths[seg_i][seg_j]
            t_i = t_i + off_i
            t_j = t_j + off_j
            S += y * similarity_paths(X_raw, t_i, t_j, n_samples[y], max_samples, only_one=(y>0))
    
    return S + S.T, scipy.spatial.distance.cdist(X_raw.T, X_raw.T, metric='seuclidean'), intframes

In [8]:
@numba.jit
def get_feature_paths(X_raw, t_i, t_j, n_samples, max_samples, only_one=True):
    
    X = np.empty((len(t_i), X_raw.shape[0]), dtype=X_raw.dtype)
    
    k = 0
    used_once = np.zeros(X_raw.shape[1], dtype=bool)
    
    for i, j in zip(t_i, t_j):
        if n_samples[i] >= max_samples:
            continue
            
        if only_one and (used_once[i] or used_once[j]):
            continue
            
        n_samples[i] += 1
        n_samples[j] += 1
        
        used_once[i] = True
        used_once[j] = True
        
        X[k] = np.abs(X_raw[:, i] - X_raw[:, j])
        k = k + 1
    
    return X[:k]

In [306]:
def make_training_data(max_samples=4,
                       paths=None,
                       file_name=None,
                       thresholds=None,
                       labels=None,
                       intervals=None,
                       fmeasures=None,
                       scores=None):
    
    # intframes gives the section->cqt frame alignments
    X_raw, intframes = load_feature_data(file_name)
    
    thresh = thresholds['none']
    
    n_segments = len(paths)
    
    n_samples = np.zeros((2, X_raw.shape[1]))
    
    ex_x, ex_y = [], []
    
    for seg_i in range(n_segments):
        off_i = intframes[seg_i, 0]
        
        for seg_j in range(seg_i + 1, len(paths[seg_i])):
            off_j = intframes[seg_j, 0]
            
            if not isinstance(paths[seg_i][seg_j], list):
                continue
            if not np.isfinite(scores[seg_i, seg_j]):
                continue
                
            if scores[seg_i, seg_j] <= thresh:
                y = 1
            else:
                y = 0
                
            # Pull out features from the path
            t_i, t_j = paths[seg_i][seg_j]
            t_i = t_i + off_i
            t_j = t_j + off_j
            
            X = get_feature_paths(X_raw, t_i, t_j, n_samples[y], max_samples, only_one=y)
            ex_x.append(X)
            ex_y.append(y * np.ones(len(X), dtype=np.int32))
    
    if len(ex_x):
        ex_x = np.concatenate(ex_x)
        ex_y = np.concatenate(ex_y)

    else:
        ex_x = np.empty( (0, X_raw.shape[0]), dtype=X_raw.dtype)
        ex_y = np.empty( (0, 1), dtype=np.int32)
        
    return ex_x, ex_y

In [307]:
import os
def process_file(file_scores, max_samples=8):
    
    if file_scores['paths']:
        X, Y = make_training_data(max_samples=max_samples,
                                  **file_scores)
        outfile = '../data/labeled_features/{}_beats.npz'.format(os.path.basename(file_scores['file_name']))
        np.savez(outfile, X=X, Y=Y)

In [327]:
all_data = pickle.load(open('../data/scores_datasetESALAMI_levelEfunction_distEL2.pk'))
#all_data = pickle.load(open('../data/scores_datasetEIsophonics_levelEfunction_distEL2.pk'))

In [328]:
[(x, y['file_name']) for (x,y) in enumerate(all_data['file_scores'])]


Out[328]:
[(0, 'SALAMI_396.mp3'),
 (1, 'SALAMI_822.mp3'),
 (2, 'SALAMI_748.mp3'),
 (3, 'SALAMI_564.mp3'),
 (4, 'SALAMI_584.mp3'),
 (5, 'SALAMI_550.mp3'),
 (6, 'SALAMI_1028.mp3'),
 (7, 'SALAMI_1300.mp3'),
 (8, 'SALAMI_248.mp3'),
 (9, 'SALAMI_960.mp3'),
 (10, 'SALAMI_1562.mp3'),
 (11, 'SALAMI_486.mp3'),
 (12, 'SALAMI_1180.mp3'),
 (13, 'SALAMI_990.mp3'),
 (14, 'SALAMI_1462.mp3'),
 (15, 'SALAMI_304.mp3'),
 (16, 'SALAMI_40.mp3'),
 (17, 'SALAMI_356.mp3'),
 (18, 'SALAMI_540.mp3'),
 (19, 'SALAMI_634.mp3'),
 (20, 'SALAMI_970.mp3'),
 (21, 'SALAMI_362.mp3'),
 (22, 'SALAMI_1394.mp3'),
 (23, 'SALAMI_772.mp3'),
 (24, 'SALAMI_842.mp3'),
 (25, 'SALAMI_866.mp3'),
 (26, 'SALAMI_12.mp3'),
 (27, 'SALAMI_1390.mp3'),
 (28, 'SALAMI_892.mp3'),
 (29, 'SALAMI_1258.mp3'),
 (30, 'SALAMI_1314.mp3'),
 (31, 'SALAMI_1338.mp3'),
 (32, 'SALAMI_986.mp3'),
 (33, 'SALAMI_1216.mp3'),
 (34, 'SALAMI_1012.mp3'),
 (35, 'SALAMI_264.mp3'),
 (36, 'SALAMI_1406.mp3'),
 (37, 'SALAMI_18.mp3'),
 (38, 'SALAMI_1092.mp3'),
 (39, 'SALAMI_1426.mp3'),
 (40, 'SALAMI_1156.mp3'),
 (41, 'SALAMI_458.mp3'),
 (42, 'SALAMI_732.mp3'),
 (43, 'SALAMI_1418.mp3'),
 (44, 'SALAMI_834.mp3'),
 (45, 'SALAMI_798.mp3'),
 (46, 'SALAMI_856.mp3'),
 (47, 'SALAMI_1566.mp3'),
 (48, 'SALAMI_838.mp3'),
 (49, 'SALAMI_176.mp3'),
 (50, 'SALAMI_1366.mp3'),
 (51, 'SALAMI_542.mp3'),
 (52, 'SALAMI_414.mp3'),
 (53, 'SALAMI_1414.mp3'),
 (54, 'SALAMI_518.mp3'),
 (55, 'SALAMI_1540.mp3'),
 (56, 'SALAMI_316.mp3'),
 (57, 'SALAMI_592.mp3'),
 (58, 'SALAMI_920.mp3'),
 (59, 'SALAMI_528.mp3'),
 (60, 'SALAMI_656.mp3'),
 (61, 'SALAMI_446.mp3'),
 (62, 'SALAMI_678.mp3'),
 (63, 'SALAMI_768.mp3'),
 (64, 'SALAMI_1024.mp3'),
 (65, 'SALAMI_554.mp3'),
 (66, 'SALAMI_1438.mp3'),
 (67, 'SALAMI_1212.mp3'),
 (68, 'SALAMI_156.mp3'),
 (69, 'SALAMI_198.mp3'),
 (70, 'SALAMI_556.mp3'),
 (71, 'SALAMI_372.mp3'),
 (72, 'SALAMI_628.mp3'),
 (73, 'SALAMI_390.mp3'),
 (74, 'SALAMI_6.mp3'),
 (75, 'SALAMI_326.mp3'),
 (76, 'SALAMI_192.mp3'),
 (77, 'SALAMI_110.mp3'),
 (78, 'SALAMI_216.mp3'),
 (79, 'SALAMI_1266.mp3'),
 (80, 'SALAMI_802.mp3'),
 (81, 'SALAMI_1242.mp3'),
 (82, 'SALAMI_200.mp3'),
 (83, 'SALAMI_210.mp3'),
 (84, 'SALAMI_566.mp3'),
 (85, 'SALAMI_956.mp3'),
 (86, 'SALAMI_1230.mp3'),
 (87, 'SALAMI_876.mp3'),
 (88, 'SALAMI_306.mp3'),
 (89, 'SALAMI_344.mp3'),
 (90, 'SALAMI_420.mp3'),
 (91, 'SALAMI_846.mp3'),
 (92, 'SALAMI_334.mp3'),
 (93, 'SALAMI_250.mp3'),
 (94, 'SALAMI_1542.mp3'),
 (95, 'SALAMI_568.mp3'),
 (96, 'SALAMI_812.mp3'),
 (97, 'SALAMI_1206.mp3'),
 (98, 'SALAMI_1336.mp3'),
 (99, 'SALAMI_734.mp3'),
 (100, 'SALAMI_904.mp3'),
 (101, 'SALAMI_1244.mp3'),
 (102, 'SALAMI_600.mp3'),
 (103, 'SALAMI_570.mp3'),
 (104, 'SALAMI_1416.mp3'),
 (105, 'SALAMI_872.mp3'),
 (106, 'SALAMI_408.mp3'),
 (107, 'SALAMI_882.mp3'),
 (108, 'SALAMI_496.mp3'),
 (109, 'SALAMI_668.mp3'),
 (110, 'SALAMI_738.mp3'),
 (111, 'SALAMI_454.mp3'),
 (112, 'SALAMI_770.mp3'),
 (113, 'SALAMI_830.mp3'),
 (114, 'SALAMI_1288.mp3'),
 (115, 'SALAMI_168.mp3'),
 (116, 'SALAMI_1166.mp3'),
 (117, 'SALAMI_1484.mp3'),
 (118, 'SALAMI_1160.mp3'),
 (119, 'SALAMI_1506.mp3'),
 (120, 'SALAMI_346.mp3'),
 (121, 'SALAMI_1158.mp3'),
 (122, 'SALAMI_608.mp3'),
 (123, 'SALAMI_188.mp3'),
 (124, 'SALAMI_636.mp3'),
 (125, 'SALAMI_270.mp3'),
 (126, 'SALAMI_120.mp3'),
 (127, 'SALAMI_916.mp3'),
 (128, 'SALAMI_966.mp3'),
 (129, 'SALAMI_674.mp3'),
 (130, 'SALAMI_704.mp3'),
 (131, 'SALAMI_1178.mp3'),
 (132, 'SALAMI_436.mp3'),
 (133, 'SALAMI_1082.mp3'),
 (134, 'SALAMI_336.mp3'),
 (135, 'SALAMI_1432.mp3'),
 (136, 'SALAMI_932.mp3'),
 (137, 'SALAMI_938.mp3'),
 (138, 'SALAMI_1498.mp3'),
 (139, 'SALAMI_108.mp3'),
 (140, 'SALAMI_1032.mp3'),
 (141, 'SALAMI_1060.mp3'),
 (142, 'SALAMI_806.mp3'),
 (143, 'SALAMI_1344.mp3'),
 (144, 'SALAMI_816.mp3'),
 (145, 'SALAMI_520.mp3'),
 (146, 'SALAMI_578.mp3'),
 (147, 'SALAMI_1002.mp3'),
 (148, 'SALAMI_1530.mp3'),
 (149, 'SALAMI_380.mp3'),
 (150, 'SALAMI_1310.mp3'),
 (151, 'SALAMI_1342.mp3'),
 (152, 'SALAMI_516.mp3'),
 (153, 'SALAMI_482.mp3'),
 (154, 'SALAMI_1358.mp3'),
 (155, 'SALAMI_1010.mp3'),
 (156, 'SALAMI_562.mp3'),
 (157, 'SALAMI_72.mp3'),
 (158, 'SALAMI_1308.mp3'),
 (159, 'SALAMI_1452.mp3'),
 (160, 'SALAMI_386.mp3'),
 (161, 'SALAMI_1038.mp3'),
 (162, 'SALAMI_1202.mp3'),
 (163, 'SALAMI_886.mp3'),
 (164, 'SALAMI_690.mp3'),
 (165, 'SALAMI_360.mp3'),
 (166, 'SALAMI_1208.mp3'),
 (167, 'SALAMI_1186.mp3'),
 (168, 'SALAMI_376.mp3'),
 (169, 'SALAMI_456.mp3'),
 (170, 'SALAMI_536.mp3'),
 (171, 'SALAMI_88.mp3'),
 (172, 'SALAMI_132.mp3'),
 (173, 'SALAMI_728.mp3'),
 (174, 'SALAMI_1104.mp3'),
 (175, 'SALAMI_676.mp3'),
 (176, 'SALAMI_1124.mp3'),
 (177, 'SALAMI_1232.mp3'),
 (178, 'SALAMI_1514.mp3'),
 (179, 'SALAMI_42.mp3'),
 (180, 'SALAMI_294.mp3'),
 (181, 'SALAMI_122.mp3'),
 (182, 'SALAMI_4.mp3'),
 (183, 'SALAMI_544.mp3'),
 (184, 'SALAMI_780.mp3'),
 (185, 'SALAMI_44.mp3'),
 (186, 'SALAMI_612.mp3'),
 (187, 'SALAMI_338.mp3'),
 (188, 'SALAMI_1058.mp3'),
 (189, 'SALAMI_52.mp3'),
 (190, 'SALAMI_688.mp3'),
 (191, 'SALAMI_666.mp3'),
 (192, 'SALAMI_92.mp3'),
 (193, 'SALAMI_788.mp3'),
 (194, 'SALAMI_166.mp3'),
 (195, 'SALAMI_46.mp3'),
 (196, 'SALAMI_8.mp3'),
 (197, 'SALAMI_1408.mp3'),
 (198, 'SALAMI_1582.mp3'),
 (199, 'SALAMI_526.mp3'),
 (200, 'SALAMI_1492.mp3'),
 (201, 'SALAMI_586.mp3'),
 (202, 'SALAMI_928.mp3'),
 (203, 'SALAMI_152.mp3'),
 (204, 'SALAMI_640.mp3'),
 (205, 'SALAMI_778.mp3'),
 (206, 'SALAMI_1410.mp3'),
 (207, 'SALAMI_854.mp3'),
 (208, 'SALAMI_1302.mp3'),
 (209, 'SALAMI_1356.mp3'),
 (210, 'SALAMI_242.mp3'),
 (211, 'SALAMI_1422.mp3'),
 (212, 'SALAMI_1030.mp3'),
 (213, 'SALAMI_1368.mp3'),
 (214, 'SALAMI_1436.mp3'),
 (215, 'SALAMI_1486.mp3'),
 (216, 'SALAMI_1450.mp3'),
 (217, 'SALAMI_240.mp3'),
 (218, 'SALAMI_936.mp3'),
 (219, 'SALAMI_1320.mp3'),
 (220, 'SALAMI_480.mp3'),
 (221, 'SALAMI_1596.mp3'),
 (222, 'SALAMI_902.mp3'),
 (223, 'SALAMI_850.mp3'),
 (224, 'SALAMI_1440.mp3'),
 (225, 'SALAMI_148.mp3'),
 (226, 'SALAMI_944.mp3'),
 (227, 'SALAMI_350.mp3'),
 (228, 'SALAMI_1424.mp3'),
 (229, 'SALAMI_100.mp3'),
 (230, 'SALAMI_922.mp3'),
 (231, 'SALAMI_1228.mp3'),
 (232, 'SALAMI_1088.mp3'),
 (233, 'SALAMI_1474.mp3'),
 (234, 'SALAMI_90.mp3'),
 (235, 'SALAMI_1260.mp3'),
 (236, 'SALAMI_994.mp3'),
 (237, 'SALAMI_1490.mp3'),
 (238, 'SALAMI_724.mp3'),
 (239, 'SALAMI_370.mp3'),
 (240, 'SALAMI_1568.mp3'),
 (241, 'SALAMI_1384.mp3'),
 (242, 'SALAMI_368.mp3'),
 (243, 'SALAMI_808.mp3'),
 (244, 'SALAMI_124.mp3'),
 (245, 'SALAMI_1550.mp3'),
 (246, 'SALAMI_394.mp3'),
 (247, 'SALAMI_1296.mp3'),
 (248, 'SALAMI_1312.mp3'),
 (249, 'SALAMI_848.mp3'),
 (250, 'SALAMI_328.mp3'),
 (251, 'SALAMI_1210.mp3'),
 (252, 'SALAMI_332.mp3'),
 (253, 'SALAMI_1008.mp3'),
 (254, 'SALAMI_758.mp3'),
 (255, 'SALAMI_460.mp3'),
 (256, 'SALAMI_1248.mp3'),
 (257, 'SALAMI_604.mp3'),
 (258, 'SALAMI_364.mp3'),
 (259, 'SALAMI_1014.mp3'),
 (260, 'SALAMI_82.mp3'),
 (261, 'SALAMI_686.mp3'),
 (262, 'SALAMI_1246.mp3'),
 (263, 'SALAMI_274.mp3'),
 (264, 'SALAMI_894.mp3'),
 (265, 'SALAMI_1072.mp3'),
 (266, 'SALAMI_228.mp3'),
 (267, 'SALAMI_852.mp3'),
 (268, 'SALAMI_1364.mp3'),
 (269, 'SALAMI_648.mp3'),
 (270, 'SALAMI_410.mp3'),
 (271, 'SALAMI_1374.mp3'),
 (272, 'SALAMI_398.mp3'),
 (273, 'SALAMI_652.mp3'),
 (274, 'SALAMI_1168.mp3'),
 (275, 'SALAMI_828.mp3'),
 (276, 'SALAMI_950.mp3'),
 (277, 'SALAMI_930.mp3'),
 (278, 'SALAMI_712.mp3'),
 (279, 'SALAMI_1270.mp3'),
 (280, 'SALAMI_340.mp3'),
 (281, 'SALAMI_696.mp3'),
 (282, 'SALAMI_86.mp3'),
 (283, 'SALAMI_888.mp3'),
 (284, 'SALAMI_1192.mp3'),
 (285, 'SALAMI_1106.mp3'),
 (286, 'SALAMI_794.mp3'),
 (287, 'SALAMI_94.mp3'),
 (288, 'SALAMI_1164.mp3'),
 (289, 'SALAMI_1434.mp3'),
 (290, 'SALAMI_700.mp3'),
 (291, 'SALAMI_1214.mp3'),
 (292, 'SALAMI_214.mp3'),
 (293, 'SALAMI_800.mp3'),
 (294, 'SALAMI_470.mp3'),
 (295, 'SALAMI_1252.mp3'),
 (296, 'SALAMI_260.mp3'),
 (297, 'SALAMI_1532.mp3'),
 (298, 'SALAMI_1262.mp3'),
 (299, 'SALAMI_348.mp3'),
 (300, 'SALAMI_1554.mp3'),
 (301, 'SALAMI_1592.mp3'),
 (302, 'SALAMI_218.mp3'),
 (303, 'SALAMI_1456.mp3'),
 (304, 'SALAMI_1278.mp3'),
 (305, 'SALAMI_860.mp3'),
 (306, 'SALAMI_58.mp3'),
 (307, 'SALAMI_670.mp3'),
 (308, 'SALAMI_1458.mp3'),
 (309, 'SALAMI_924.mp3'),
 (310, 'SALAMI_1250.mp3'),
 (311, 'SALAMI_388.mp3'),
 (312, 'SALAMI_864.mp3'),
 (313, 'SALAMI_1386.mp3'),
 (314, 'SALAMI_1558.mp3'),
 (315, 'SALAMI_1524.mp3'),
 (316, 'SALAMI_128.mp3'),
 (317, 'SALAMI_1504.mp3'),
 (318, 'SALAMI_422.mp3'),
 (319, 'SALAMI_874.mp3'),
 (320, 'SALAMI_514.mp3'),
 (321, 'SALAMI_832.mp3'),
 (322, 'SALAMI_558.mp3'),
 (323, 'SALAMI_680.mp3'),
 (324, 'SALAMI_1348.mp3'),
 (325, 'SALAMI_718.mp3'),
 (326, 'SALAMI_1102.mp3'),
 (327, 'SALAMI_1268.mp3'),
 (328, 'SALAMI_1598.mp3'),
 (329, 'SALAMI_1522.mp3'),
 (330, 'SALAMI_1404.mp3'),
 (331, 'SALAMI_954.mp3'),
 (332, 'SALAMI_170.mp3'),
 (333, 'SALAMI_320.mp3'),
 (334, 'SALAMI_1510.mp3'),
 (335, 'SALAMI_1588.mp3'),
 (336, 'SALAMI_1118.mp3'),
 (337, 'SALAMI_1520.mp3'),
 (338, 'SALAMI_1306.mp3'),
 (339, 'SALAMI_610.mp3'),
 (340, 'SALAMI_532.mp3'),
 (341, 'SALAMI_382.mp3'),
 (342, 'SALAMI_160.mp3'),
 (343, 'SALAMI_1020.mp3'),
 (344, 'SALAMI_400.mp3'),
 (345, 'SALAMI_616.mp3'),
 (346, 'SALAMI_622.mp3'),
 (347, 'SALAMI_896.mp3'),
 (348, 'SALAMI_776.mp3'),
 (349, 'SALAMI_78.mp3'),
 (350, 'SALAMI_746.mp3'),
 (351, 'SALAMI_1224.mp3'),
 (352, 'SALAMI_548.mp3'),
 (353, 'SALAMI_1352.mp3'),
 (354, 'SALAMI_1240.mp3'),
 (355, 'SALAMI_1324.mp3'),
 (356, 'SALAMI_1050.mp3'),
 (357, 'SALAMI_504.mp3'),
 (358, 'SALAMI_308.mp3'),
 (359, 'SALAMI_1144.mp3'),
 (360, 'SALAMI_484.mp3'),
 (361, 'SALAMI_412.mp3'),
 (362, 'SALAMI_342.mp3'),
 (363, 'SALAMI_1070.mp3'),
 (364, 'SALAMI_1286.mp3'),
 (365, 'SALAMI_934.mp3'),
 (366, 'SALAMI_1044.mp3'),
 (367, 'SALAMI_898.mp3'),
 (368, 'SALAMI_186.mp3'),
 (369, 'SALAMI_432.mp3'),
 (370, 'SALAMI_204.mp3'),
 (371, 'SALAMI_1130.mp3'),
 (372, 'SALAMI_534.mp3'),
 (373, 'SALAMI_1572.mp3'),
 (374, 'SALAMI_430.mp3'),
 (375, 'SALAMI_858.mp3'),
 (376, 'SALAMI_1548.mp3'),
 (377, 'SALAMI_740.mp3'),
 (378, 'SALAMI_1428.mp3'),
 (379, 'SALAMI_642.mp3'),
 (380, 'SALAMI_708.mp3'),
 (381, 'SALAMI_1334.mp3'),
 (382, 'SALAMI_524.mp3'),
 (383, 'SALAMI_1150.mp3'),
 (384, 'SALAMI_352.mp3'),
 (385, 'SALAMI_588.mp3'),
 (386, 'SALAMI_212.mp3'),
 (387, 'SALAMI_1146.mp3'),
 (388, 'SALAMI_968.mp3'),
 (389, 'SALAMI_1234.mp3'),
 (390, 'SALAMI_48.mp3'),
 (391, 'SALAMI_180.mp3'),
 (392, 'SALAMI_1078.mp3'),
 (393, 'SALAMI_1128.mp3'),
 (394, 'SALAMI_672.mp3'),
 (395, 'SALAMI_116.mp3'),
 (396, 'SALAMI_1034.mp3'),
 (397, 'SALAMI_1460.mp3'),
 (398, 'SALAMI_1478.mp3'),
 (399, 'SALAMI_1346.mp3'),
 (400, 'SALAMI_618.mp3'),
 (401, 'SALAMI_942.mp3'),
 (402, 'SALAMI_1446.mp3'),
 (403, 'SALAMI_140.mp3'),
 (404, 'SALAMI_1190.mp3'),
 (405, 'SALAMI_1074.mp3'),
 (406, 'SALAMI_1360.mp3'),
 (407, 'SALAMI_630.mp3'),
 (408, 'SALAMI_736.mp3'),
 (409, 'SALAMI_28.mp3'),
 (410, 'SALAMI_254.mp3'),
 (411, 'SALAMI_972.mp3'),
 (412, 'SALAMI_142.mp3'),
 (413, 'SALAMI_1292.mp3'),
 (414, 'SALAMI_1328.mp3'),
 (415, 'SALAMI_1580.mp3'),
 (416, 'SALAMI_1264.mp3'),
 (417, 'SALAMI_1194.mp3'),
 (418, 'SALAMI_964.mp3'),
 (419, 'SALAMI_158.mp3'),
 (420, 'SALAMI_1134.mp3'),
 (421, 'SALAMI_60.mp3'),
 (422, 'SALAMI_416.mp3'),
 (423, 'SALAMI_1466.mp3'),
 (424, 'SALAMI_272.mp3'),
 (425, 'SALAMI_1184.mp3'),
 (426, 'SALAMI_914.mp3'),
 (427, 'SALAMI_136.mp3'),
 (428, 'SALAMI_154.mp3'),
 (429, 'SALAMI_378.mp3'),
 (430, 'SALAMI_1472.mp3'),
 (431, 'SALAMI_1026.mp3'),
 (432, 'SALAMI_782.mp3'),
 (433, 'SALAMI_810.mp3'),
 (434, 'SALAMI_726.mp3'),
 (435, 'SALAMI_1526.mp3'),
 (436, 'SALAMI_594.mp3'),
 (437, 'SALAMI_574.mp3'),
 (438, 'SALAMI_786.mp3'),
 (439, 'SALAMI_498.mp3'),
 (440, 'SALAMI_1454.mp3'),
 (441, 'SALAMI_1388.mp3'),
 (442, 'SALAMI_1464.mp3'),
 (443, 'SALAMI_1080.mp3'),
 (444, 'SALAMI_318.mp3'),
 (445, 'SALAMI_530.mp3'),
 (446, 'SALAMI_1138.mp3'),
 (447, 'SALAMI_1174.mp3'),
 (448, 'SALAMI_476.mp3'),
 (449, 'SALAMI_906.mp3'),
 (450, 'SALAMI_1006.mp3'),
 (451, 'SALAMI_1142.mp3'),
 (452, 'SALAMI_392.mp3'),
 (453, 'SALAMI_762.mp3'),
 (454, 'SALAMI_462.mp3'),
 (455, 'SALAMI_646.mp3'),
 (456, 'SALAMI_1220.mp3'),
 (457, 'SALAMI_1398.mp3'),
 (458, 'SALAMI_1412.mp3'),
 (459, 'SALAMI_34.mp3'),
 (460, 'SALAMI_20.mp3'),
 (461, 'SALAMI_698.mp3'),
 (462, 'SALAMI_1280.mp3'),
 (463, 'SALAMI_546.mp3'),
 (464, 'SALAMI_126.mp3'),
 (465, 'SALAMI_760.mp3'),
 (466, 'SALAMI_1370.mp3'),
 (467, 'SALAMI_590.mp3'),
 (468, 'SALAMI_702.mp3'),
 (469, 'SALAMI_130.mp3'),
 (470, 'SALAMI_1560.mp3'),
 (471, 'SALAMI_720.mp3'),
 (472, 'SALAMI_36.mp3'),
 (473, 'SALAMI_1040.mp3'),
 (474, 'SALAMI_162.mp3'),
 (475, 'SALAMI_750.mp3'),
 (476, 'SALAMI_714.mp3'),
 (477, 'SALAMI_606.mp3'),
 (478, 'SALAMI_1048.mp3'),
 (479, 'SALAMI_940.mp3'),
 (480, 'SALAMI_694.mp3'),
 (481, 'SALAMI_826.mp3'),
 (482, 'SALAMI_1304.mp3'),
 (483, 'SALAMI_1298.mp3'),
 (484, 'SALAMI_654.mp3'),
 (485, 'SALAMI_1274.mp3'),
 (486, 'SALAMI_1516.mp3'),
 (487, 'SALAMI_614.mp3'),
 (488, 'SALAMI_492.mp3'),
 (489, 'SALAMI_844.mp3'),
 (490, 'SALAMI_1170.mp3'),
 (491, 'SALAMI_1518.mp3'),
 (492, 'SALAMI_500.mp3'),
 (493, 'SALAMI_988.mp3'),
 (494, 'SALAMI_1112.mp3'),
 (495, 'SALAMI_1544.mp3'),
 (496, 'SALAMI_30.mp3'),
 (497, 'SALAMI_24.mp3'),
 (498, 'SALAMI_438.mp3'),
 (499, 'SALAMI_1176.mp3'),
 (500, 'SALAMI_1382.mp3'),
 (501, 'SALAMI_868.mp3'),
 (502, 'SALAMI_1350.mp3'),
 (503, 'SALAMI_1200.mp3'),
 (504, 'SALAMI_164.mp3'),
 (505, 'SALAMI_824.mp3'),
 (506, 'SALAMI_1218.mp3'),
 (507, 'SALAMI_312.mp3'),
 (508, 'SALAMI_1196.mp3'),
 (509, 'SALAMI_1528.mp3'),
 (510, 'SALAMI_958.mp3'),
 (511, 'SALAMI_1066.mp3'),
 (512, 'SALAMI_358.mp3'),
 (513, 'SALAMI_1256.mp3'),
 (514, 'SALAMI_440.mp3'),
 (515, 'SALAMI_16.mp3'),
 (516, 'SALAMI_1538.mp3'),
 (517, 'SALAMI_1594.mp3'),
 (518, 'SALAMI_118.mp3'),
 (519, 'SALAMI_1316.mp3'),
 (520, 'SALAMI_310.mp3'),
 (521, 'SALAMI_366.mp3'),
 (522, 'SALAMI_552.mp3'),
 (523, 'SALAMI_424.mp3'),
 (524, 'SALAMI_1340.mp3'),
 (525, 'SALAMI_1534.mp3'),
 (526, 'SALAMI_222.mp3'),
 (527, 'SALAMI_744.mp3'),
 (528, 'SALAMI_1430.mp3'),
 (529, 'SALAMI_1284.mp3'),
 (530, 'SALAMI_478.mp3'),
 (531, 'SALAMI_1496.mp3'),
 (532, 'SALAMI_184.mp3'),
 (533, 'SALAMI_1116.mp3'),
 (534, 'SALAMI_1576.mp3'),
 (535, 'SALAMI_1294.mp3'),
 (536, 'SALAMI_1448.mp3'),
 (537, 'SALAMI_682.mp3'),
 (538, 'SALAMI_488.mp3'),
 (539, 'SALAMI_354.mp3'),
 (540, 'SALAMI_1148.mp3'),
 (541, 'SALAMI_234.mp3'),
 (542, 'SALAMI_494.mp3'),
 (543, 'SALAMI_1018.mp3'),
 (544, 'SALAMI_1188.mp3'),
 (545, 'SALAMI_626.mp3'),
 (546, 'SALAMI_22.mp3'),
 (547, 'SALAMI_2.mp3'),
 (548, 'SALAMI_374.mp3'),
 (549, 'SALAMI_1502.mp3'),
 (550, 'SALAMI_314.mp3'),
 (551, 'SALAMI_1376.mp3'),
 (552, 'SALAMI_1226.mp3'),
 (553, 'SALAMI_684.mp3'),
 (554, 'SALAMI_814.mp3'),
 (555, 'SALAMI_1052.mp3'),
 (556, 'SALAMI_1272.mp3'),
 (557, 'SALAMI_1468.mp3'),
 (558, 'SALAMI_538.mp3'),
 (559, 'SALAMI_962.mp3'),
 (560, 'SALAMI_1276.mp3'),
 (561, 'SALAMI_1362.mp3'),
 (562, 'SALAMI_502.mp3'),
 (563, 'SALAMI_908.mp3'),
 (564, 'SALAMI_14.mp3'),
 (565, 'SALAMI_138.mp3'),
 (566, 'SALAMI_1056.mp3'),
 (567, 'SALAMI_602.mp3'),
 (568, 'SALAMI_862.mp3'),
 (569, 'SALAMI_508.mp3'),
 (570, 'SALAMI_38.mp3'),
 (571, 'SALAMI_576.mp3'),
 (572, 'SALAMI_1036.mp3'),
 (573, 'SALAMI_1402.mp3'),
 (574, 'SALAMI_252.mp3'),
 (575, 'SALAMI_998.mp3'),
 (576, 'SALAMI_70.mp3'),
 (577, 'SALAMI_1198.mp3'),
 (578, 'SALAMI_658.mp3'),
 (579, 'SALAMI_1546.mp3'),
 (580, 'SALAMI_1182.mp3'),
 (581, 'SALAMI_302.mp3'),
 (582, 'SALAMI_580.mp3'),
 (583, 'SALAMI_1120.mp3'),
 (584, 'SALAMI_32.mp3'),
 (585, 'SALAMI_444.mp3'),
 (586, 'SALAMI_10.mp3'),
 (587, 'SALAMI_1126.mp3'),
 (588, 'SALAMI_884.mp3'),
 (589, 'SALAMI_282.mp3'),
 (590, 'SALAMI_1254.mp3'),
 (591, 'SALAMI_1204.mp3'),
 (592, 'SALAMI_1132.mp3'),
 (593, 'SALAMI_434.mp3'),
 (594, 'SALAMI_262.mp3'),
 (595, 'SALAMI_796.mp3'),
 (596, 'SALAMI_1480.mp3'),
 (597, 'SALAMI_1494.mp3'),
 (598, 'SALAMI_742.mp3'),
 (599, 'SALAMI_1152.mp3'),
 (600, 'SALAMI_1136.mp3'),
 (601, 'SALAMI_1578.mp3'),
 (602, 'SALAMI_278.mp3'),
 (603, 'SALAMI_996.mp3'),
 (604, 'SALAMI_404.mp3'),
 (605, 'SALAMI_1084.mp3'),
 (606, 'SALAMI_1046.mp3'),
 (607, 'SALAMI_582.mp3'),
 (608, 'SALAMI_974.mp3'),
 (609, 'SALAMI_596.mp3'),
 (610, 'SALAMI_1332.mp3'),
 (611, 'SALAMI_236.mp3'),
 (612, 'SALAMI_598.mp3'),
 (613, 'SALAMI_836.mp3'),
 (614, 'SALAMI_980.mp3'),
 (615, 'SALAMI_418.mp3'),
 (616, 'SALAMI_774.mp3'),
 (617, 'SALAMI_1016.mp3'),
 (618, 'SALAMI_1442.mp3'),
 (619, 'SALAMI_952.mp3'),
 (620, 'SALAMI_506.mp3'),
 (621, 'SALAMI_1122.mp3'),
 (622, 'SALAMI_948.mp3'),
 (623, 'SALAMI_766.mp3'),
 (624, 'SALAMI_452.mp3'),
 (625, 'SALAMI_322.mp3'),
 (626, 'SALAMI_722.mp3'),
 (627, 'SALAMI_474.mp3'),
 (628, 'SALAMI_1508.mp3'),
 (629, 'SALAMI_1378.mp3'),
 (630, 'SALAMI_572.mp3'),
 (631, 'SALAMI_232.mp3'),
 (632, 'SALAMI_1282.mp3'),
 (633, 'SALAMI_1054.mp3'),
 (634, 'SALAMI_104.mp3'),
 (635, 'SALAMI_1094.mp3'),
 (636, 'SALAMI_442.mp3'),
 (637, 'SALAMI_510.mp3'),
 (638, 'SALAMI_946.mp3'),
 (639, 'SALAMI_692.mp3'),
 (640, 'SALAMI_286.mp3'),
 (641, 'SALAMI_112.mp3'),
 (642, 'SALAMI_644.mp3'),
 (643, 'SALAMI_638.mp3'),
 (644, 'SALAMI_512.mp3'),
 (645, 'SALAMI_820.mp3'),
 (646, 'SALAMI_1584.mp3'),
 (647, 'SALAMI_880.mp3'),
 (648, 'SALAMI_784.mp3'),
 (649, 'SALAMI_840.mp3'),
 (650, 'SALAMI_464.mp3'),
 (651, 'SALAMI_220.mp3'),
 (652, 'SALAMI_490.mp3'),
 (653, 'SALAMI_890.mp3'),
 (654, 'SALAMI_900.mp3'),
 (655, 'SALAMI_426.mp3'),
 (656, 'SALAMI_984.mp3'),
 (657, 'SALAMI_730.mp3'),
 (658, 'SALAMI_1330.mp3'),
 (659, 'SALAMI_450.mp3'),
 (660, 'SALAMI_878.mp3'),
 (661, 'SALAMI_660.mp3'),
 (662, 'SALAMI_64.mp3'),
 (663, 'SALAMI_1062.mp3'),
 (664, 'SALAMI_1552.mp3'),
 (665, 'SALAMI_1444.mp3'),
 (666, 'SALAMI_448.mp3'),
 (667, 'SALAMI_1108.mp3'),
 (668, 'SALAMI_1512.mp3'),
 (669, 'SALAMI_266.mp3'),
 (670, 'SALAMI_792.mp3'),
 (671, 'SALAMI_1380.mp3'),
 (672, 'SALAMI_662.mp3'),
 (673, 'SALAMI_1096.mp3'),
 (674, 'SALAMI_114.mp3'),
 (675, 'SALAMI_976.mp3'),
 (676, 'SALAMI_1238.mp3'),
 (677, 'SALAMI_1574.mp3'),
 (678, 'SALAMI_466.mp3'),
 (679, 'SALAMI_56.mp3'),
 (680, 'SALAMI_190.mp3'),
 (681, 'SALAMI_1536.mp3'),
 (682, 'SALAMI_68.mp3'),
 (683, 'SALAMI_1068.mp3'),
 (684, 'SALAMI_912.mp3'),
 (685, 'SALAMI_756.mp3'),
 (686, 'SALAMI_296.mp3'),
 (687, 'SALAMI_632.mp3'),
 (688, 'SALAMI_710.mp3'),
 (689, 'SALAMI_1318.mp3'),
 (690, 'SALAMI_284.mp3'),
 (691, 'SALAMI_50.mp3'),
 (692, 'SALAMI_1476.mp3'),
 (693, 'SALAMI_1354.mp3'),
 (694, 'SALAMI_98.mp3'),
 (695, 'SALAMI_620.mp3'),
 (696, 'SALAMI_918.mp3'),
 (697, 'SALAMI_1140.mp3'),
 (698, 'SALAMI_1098.mp3'),
 (699, 'SALAMI_406.mp3'),
 (700, 'SALAMI_1090.mp3'),
 (701, 'SALAMI_752.mp3'),
 (702, 'SALAMI_1004.mp3'),
 (703, 'SALAMI_428.mp3'),
 (704, 'SALAMI_982.mp3'),
 (705, 'SALAMI_1326.mp3'),
 (706, 'SALAMI_1586.mp3'),
 (707, 'SALAMI_1392.mp3'),
 (708, 'SALAMI_1042.mp3'),
 (709, 'SALAMI_146.mp3'),
 (710, 'SALAMI_650.mp3'),
 (711, 'SALAMI_1022.mp3'),
 (712, 'SALAMI_1590.mp3'),
 (713, 'SALAMI_706.mp3'),
 (714, 'SALAMI_298.mp3'),
 (715, 'SALAMI_624.mp3'),
 (716, 'SALAMI_402.mp3'),
 (717, 'SALAMI_1372.mp3'),
 (718, 'SALAMI_1076.mp3'),
 (719, 'SALAMI_288.mp3'),
 (720, 'SALAMI_1322.mp3'),
 (721, 'SALAMI_1064.mp3'),
 (722, 'SALAMI_150.mp3'),
 (723, 'SALAMI_926.mp3'),
 (724, 'SALAMI_280.mp3'),
 (725, 'SALAMI_716.mp3'),
 (726, 'SALAMI_1100.mp3'),
 (727, 'SALAMI_1162.mp3'),
 (728, 'SALAMI_1222.mp3'),
 (729, 'SALAMI_1000.mp3'),
 (730, 'SALAMI_276.mp3'),
 (731, 'SALAMI_258.mp3'),
 (732, 'SALAMI_1396.mp3'),
 (733, 'SALAMI_54.mp3'),
 (734, 'SALAMI_910.mp3'),
 (735, 'SALAMI_1470.mp3'),
 (736, 'SALAMI_1236.mp3'),
 (737, 'SALAMI_1086.mp3'),
 (738, 'SALAMI_754.mp3'),
 (739, 'SALAMI_1110.mp3'),
 (740, 'SALAMI_26.mp3'),
 (741, 'SALAMI_522.mp3'),
 (742, 'SALAMI_1400.mp3'),
 (743, 'SALAMI_1114.mp3'),
 (744, 'SALAMI_1500.mp3'),
 (745, 'SALAMI_818.mp3'),
 (746, 'SALAMI_290.mp3'),
 (747, 'SALAMI_384.mp3'),
 (748, 'SALAMI_1154.mp3'),
 (749, 'SALAMI_664.mp3'),
 (750, 'SALAMI_206.mp3'),
 (751, 'SALAMI_870.mp3'),
 (752, 'SALAMI_790.mp3'),
 (753, 'SALAMI_1556.mp3'),
 (754, 'SALAMI_992.mp3'),
 (755, 'SALAMI_1172.mp3'),
 (756, 'SALAMI_1290.mp3'),
 (757, 'SALAMI_244.mp3'),
 (758, 'SALAMI_1482.mp3'),
 (759, 'SALAMI_468.mp3'),
 (760, 'SALAMI_1420.mp3'),
 (761, 'SALAMI_330.mp3'),
 (762, 'SALAMI_1564.mp3'),
 (763, 'SALAMI_1570.mp3'),
 (764, 'SALAMI_324.mp3'),
 (765, 'SALAMI_1488.mp3'),
 (766, 'SALAMI_268.mp3'),
 (767, 'SALAMI_978.mp3'),
 (768, 'SALAMI_472.mp3')]

In [329]:
k = 40

In [330]:
S_p, S, intframes = plot_selfsim(max_samples=1000, **all_data['file_scores'][k])

In [331]:
np.set_printoptions(precision=0, linewidth=120)

In [332]:
all_data['file_scores'][k]['thresholds']['none']


Out[332]:
36.89056

In [333]:
all_data['file_scores'][k]['scores'] <= all_data['file_scores'][k]['thresholds']['none']


Out[333]:
array([[ True, False, False, False, False, False, False, False, False, False, False, False],
       [False,  True,  True,  True,  True, False, False,  True,  True,  True, False, False],
       [False,  True,  True,  True,  True, False, False,  True,  True,  True, False, False],
       [False,  True,  True,  True,  True, False, False,  True,  True,  True, False, False],
       [False,  True,  True,  True,  True, False, False,  True,  True,  True, False, False],
       [False, False, False, False, False,  True, False, False, False, False, False, False],
       [False, False, False, False, False, False,  True, False, False, False, False, False],
       [False,  True,  True,  True,  True, False, False,  True,  True,  True, False, False],
       [False,  True,  True,  True,  True, False, False,  True,  True,  True, False, False],
       [False,  True,  True,  True,  True, False, False,  True,  True,  True, False, False],
       [False, False, False, False, False, False, False, False, False, False,  True, False],
       [False, False, False, False, False, False, False, False, False, False, False,  True]], dtype=bool)

In [334]:
import seaborn as sns

In [335]:
sns.heatmap(all_data['file_scores'][k]['scores'] <= all_data['file_scores'][k]['thresholds']['none'],
            yticklabels=all_data['file_scores'][k]['labels'])


Out[335]:
<matplotlib.axes._subplots.AxesSubplot at 0x7ffa071ab210>

In [336]:
plt.figure(figsize=(12,8))
plt.subplot(1,2,1)
librosa.display.specshow(S, aspect='equal', origin='upper')
plt.vlines(intframes[:, 0], 0, S.shape[0], color='w', alpha=0.5)
plt.hlines(intframes[:, 0], 0, S.shape[0], color='w', alpha=0.5)
plt.subplot(1,2,2)
librosa.display.specshow(S_p + np.eye(len(S_p)), vmin=-1, vmax=1.0, cmap='coolwarm', aspect='equal', origin='upper',
                         interpolation='bilinear')
plt.vlines(intframes[:, 0], 0, S.shape[0], color='k', alpha=0.5)
plt.hlines(intframes[:, 0], 0, S.shape[0], color='k', alpha=0.5)
plt.tight_layout()



In [337]:
Parallel(n_jobs=4, verbose=20)(delayed(process_file)(data) for data in all_data['file_scores']);


[Parallel(n_jobs=4)]: Done   1 out of 769 | elapsed:    0.6s remaining:  8.2min
[Parallel(n_jobs=4)]: Done  30 out of 769 | elapsed:    2.7s remaining:  1.1min
[Parallel(n_jobs=4)]: Done  69 out of 769 | elapsed:    7.4s remaining:  1.3min
[Parallel(n_jobs=4)]: Done 108 out of 769 | elapsed:   12.1s remaining:  1.2min
[Parallel(n_jobs=4)]: Done 147 out of 769 | elapsed:   17.8s remaining:  1.3min
[Parallel(n_jobs=4)]: Done 186 out of 769 | elapsed:   23.9s remaining:  1.2min
[Parallel(n_jobs=4)]: Done 225 out of 769 | elapsed:   25.7s remaining:  1.0min
[Parallel(n_jobs=4)]: Done 264 out of 769 | elapsed:   31.2s remaining:   59.6s
[Parallel(n_jobs=4)]: Done 303 out of 769 | elapsed:   35.3s remaining:   54.3s
[Parallel(n_jobs=4)]: Done 342 out of 769 | elapsed:   40.4s remaining:   50.4s
[Parallel(n_jobs=4)]: Done 381 out of 769 | elapsed:   49.6s remaining:   50.6s
[Parallel(n_jobs=4)]: Done 420 out of 769 | elapsed:   55.0s remaining:   45.7s
[Parallel(n_jobs=4)]: Done 459 out of 769 | elapsed:   58.5s remaining:   39.5s
[Parallel(n_jobs=4)]: Done 498 out of 769 | elapsed:  1.0min remaining:   33.9s
[Parallel(n_jobs=4)]: Done 537 out of 769 | elapsed:  1.1min remaining:   29.4s
[Parallel(n_jobs=4)]: Done 576 out of 769 | elapsed:  1.2min remaining:   24.5s
[Parallel(n_jobs=4)]: Done 615 out of 769 | elapsed:  1.3min remaining:   19.4s
[Parallel(n_jobs=4)]: Done 654 out of 769 | elapsed:  1.4min remaining:   14.5s
[Parallel(n_jobs=4)]: Done 693 out of 769 | elapsed:  1.5min remaining:    9.7s
[Parallel(n_jobs=4)]: Done 732 out of 769 | elapsed:  1.6min remaining:    4.7s
[Parallel(n_jobs=4)]: Done 769 out of 769 | elapsed:  1.7min finished

In [ ]: